package com.ycz;

import com.ycz.mapper.UserMapper;
import com.ycz.service.UserService;
import org.springframework.context.annotation.*;

/**
 * @author ycz
 * @date 2021/6/18
 */
@Configuration
@Import({MapperBeanDefinitionRegistry.class})
public class Application2 {

    public static void main(String[] args) throws Exception {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(Application2.class);
        applicationContext.refresh();
        UserMapper userMapper = (UserMapper) applicationContext.getBean("userMapper");
        userMapper.getById();
    }
}
